Release 10.1A: OpenEdge Development:
Programming Interfaces


Using the generic utility and caching APIs with an AppServer

The generic utility and caching APIs support execution on an AppServer. They provide functions to define the AppServer connection to be used when a local database is not present. The functions that read data from or write data to a database forward their requests to the AppServer whenever they detect that the database is not local. For AppServer execution, you can only call the procedures in the caching or generic utility APIs directly, as they are the only APIs that are AppServer aware.

If you want to call any of the other standalone procedures directly, your code needs to handle the forwarding of requests to the AppServer. For example, in the following combination of pseudo-code and 4GL, the caller handles the AppServer connection:

DEFINE VARIABLE hAppSrv AS HANDLE NO-UNDO. 
DEFINE VARIABLE hDSet   AS HANDLE NO-UNDO. 
DEFINE VARIABLE cError  AS CHAR   NO-UNDO. 
CREATE SERVER hAppSrv. 
hAppSrv:CONNECT("-AppService asbroker1 -H localhost- S 5162"). 
RUN auditing/_get-policies ON hAppSrv ("sports", OUTPUT DATASET-HANDLE hDSet, 
OUTPUT cError). 


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095